<?php

namespace api\energy\factory\electric;

use api\energy\common\Request;

/**
 * 电表控制
 *
 * @method ElectricMeterControl setaddress(string $data) 电表地址
 * @method ElectricMeterControl settype(int $data) 操作类型 1: 查询状态 2: 断电 3: 送电 4: 直接送电
 */
class ElectricMeterControl extends Request
{

    public function __construct(string $address = '', int $type = null)
    {
        $address && $this->setaddress($address);
        $type && $this->settype($type);
    }

    public function build()
    {
        $this->setUrl("/electric/meter/control");
        $this->setMethod('POST');

        $this->setRequestData($this->getRequestData());
    }

}